/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author JAVIER
 */
@Entity
@Table(name = "sorteos")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sorteos.findAll", query = "SELECT s FROM Sorteos s"),
    @NamedQuery(name = "Sorteos.findByIdSorteo", query = "SELECT s FROM Sorteos s WHERE s.idSorteo = :idSorteo"),
    @NamedQuery(name = "Sorteos.findByFecSorteo", query = "SELECT s FROM Sorteos s WHERE s.fecSorteo = :fecSorteo"),
    @NamedQuery(name = "Sorteos.findBySnum1", query = "SELECT s FROM Sorteos s WHERE s.snum1 = :snum1"),
    @NamedQuery(name = "Sorteos.findBySnum2", query = "SELECT s FROM Sorteos s WHERE s.snum2 = :snum2"),
    @NamedQuery(name = "Sorteos.findBySnum3", query = "SELECT s FROM Sorteos s WHERE s.snum3 = :snum3"),
    @NamedQuery(name = "Sorteos.findBySnum4", query = "SELECT s FROM Sorteos s WHERE s.snum4 = :snum4"),
    @NamedQuery(name = "Sorteos.findBySnum5", query = "SELECT s FROM Sorteos s WHERE s.snum5 = :snum5"),
    @NamedQuery(name = "Sorteos.findBySestre1", query = "SELECT s FROM Sorteos s WHERE s.sestre1 = :sestre1"),
    @NamedQuery(name = "Sorteos.findBySestre2", query = "SELECT s FROM Sorteos s WHERE s.sestre2 = :sestre2")})
public class Sorteos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_sorteo")
    private Integer idSorteo;
    @Column(name = "fec_sorteo")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecSorteo;
    @Column(name = "snum1")
    private Integer snum1;
    @Column(name = "snum2")
    private Integer snum2;
    @Column(name = "snum3")
    private Integer snum3;
    @Column(name = "snum4")
    private Integer snum4;
    @Column(name = "snum5")
    private Integer snum5;
    @Column(name = "sestre1")
    private Integer sestre1;
    @Column(name = "sestre2")
    private Integer sestre2;

    public Sorteos() {
    }

    public Sorteos(Integer idSorteo) {
        this.idSorteo = idSorteo;
    }

    public Integer getIdSorteo() {
        return idSorteo;
    }

    public void setIdSorteo(Integer idSorteo) {
        this.idSorteo = idSorteo;
    }

    public Date getFecSorteo() {
        return fecSorteo;
    }

    public void setFecSorteo(Date fecSorteo) {
        this.fecSorteo = fecSorteo;
    }

    public Integer getSnum1() {
        return snum1;
    }

    public void setSnum1(Integer snum1) {
        this.snum1 = snum1;
    }

    public Integer getSnum2() {
        return snum2;
    }

    public void setSnum2(Integer snum2) {
        this.snum2 = snum2;
    }

    public Integer getSnum3() {
        return snum3;
    }

    public void setSnum3(Integer snum3) {
        this.snum3 = snum3;
    }

    public Integer getSnum4() {
        return snum4;
    }

    public void setSnum4(Integer snum4) {
        this.snum4 = snum4;
    }

    public Integer getSnum5() {
        return snum5;
    }

    public void setSnum5(Integer snum5) {
        this.snum5 = snum5;
    }

    public Integer getSestre1() {
        return sestre1;
    }

    public void setSestre1(Integer sestre1) {
        this.sestre1 = sestre1;
    }

    public Integer getSestre2() {
        return sestre2;
    }

    public void setSestre2(Integer sestre2) {
        this.sestre2 = sestre2;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idSorteo != null ? idSorteo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sorteos)) {
            return false;
        }
        Sorteos other = (Sorteos) object;
        if ((this.idSorteo == null && other.idSorteo != null) || (this.idSorteo != null && !this.idSorteo.equals(other.idSorteo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entidades.Sorteos[ idSorteo=" + idSorteo + " ]";
    }
    
}
